Prepare new upload.
authorBoyuan Yang <byang@debian.org>
Tue, 2 Feb 2021 16:42:24 +0000 (11:42 -0500)
committerBoyuan Yang <byang@debian.org>
Tue, 2 Feb 2021 16:42:24 +0000 (11:42 -0500)
debian/changelog
debian/control
debian/rules

index 1d8422839b12583eeb9365c8e758821e2b4d5082..9332a2433042f560812877887939f1301f1986e1 100644 (file)
@@ -1,9 +1,11 @@
 opencc (1.1.1+git20200624+ds2-5) unstable; urgency=medium
 
-  * debian/rules: Enable dh_doxygen integration.
+  * debian/rules: Rewrite to support <!nodoc> build profile.
+  * debian/rules: Enable dh_doxygen when building docs.
   * Drop unnecessary build dependencies. (Closes: #981606)
-  * debian/control: Drop build-dependency on libjs-jquery, let
-    dh_doxygen handle it.
+  * debian/control: Mark build-dependency doxygen as <!nodoc>.
+  * debian/control: Drop build-dependency on libjs-jquery. Let
+    doxygen handle it.
   * debian/control: Drop build-dependency on graphviz. Doxyfile
     did not enable HAVE_DOT.
   * debian/control: Drop build-dependency on dartz. Currently opencc
index cbfb2e82a54c4d8b0af48125de2fd3e7e50fbfc8..2eadce4263b7d35a3b07b70889f6820b028287fa 100644 (file)
@@ -12,7 +12,7 @@ Build-Depends:
  cmake,
  darts,
  debhelper-compat (= 13),
- doxygen,
+ doxygen <!nodoc>,
  libmarisa-dev,
  libtclap-dev,
  python3:any,
@@ -73,7 +73,6 @@ Multi-Arch: foreign
 Section: doc
 Depends:
  ${misc:Depends},
- libjs-jquery,
 Description: simplified-traditional Chinese conversion library - document
  opencc is a library for converting character between traditional Chinese and
  simplified Chinese.
index 70acce0d969b18b504c8ce316c15fa69b3792370..9542519b8d397249559863a39c8036a0ebfe6580 100755 (executable)
@@ -9,19 +9,32 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 include /usr/share/dpkg/architecture.mk
 
 %:
-       dh $@ --buildsystem=cmake --with pkgkde_symbolshelper,doxygen
+       dh $@ --buildsystem=cmake --with pkgkde_symbolshelper
+
+BUILD_OPTIONS = \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DBUILD_BUNDLED_LIBMARISA=OFF
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+BUILD_OPTIONS += -DBUILD_DOCUMENTATION=ON
+else
+BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF
+endif
+
 
 override_dh_auto_configure:
-       dh_auto_configure -- \
-               -DCMAKE_INSTALL_PREFIX=/usr \
-               -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \
-               -DCMAKE_BUILD_TYPE=Release \
-               -DBUILD_DOCUMENTATION=ON \
-               -DBUILD_BUNDLED_LIBMARISA=OFF
+       dh_auto_configure -- $(BUILD_OPTIONS)
 
 execute_after_dh_auto_clean:
        find . -name *.pyc -delete
 
+execute_after_dh_installdocs-indep:
+ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+       dh_doxygen --indep
+endif
+
 override_dh_installdocs:
        dh_installdocs -plibopencc-doc --doc-main-package=opencc
        dh_installdocs --remaining-packages